<?php

	$nav = array("Home" => "", "Gallery" => "gallery/", "Picture" => "gallery/picture/index.php?gid=$gid", "edit" => "#");

	$tpl->assign("dsfm_nav", $nav);

	$form = new Form( array(
		"id" => array(
			"type" => "hidden",
		),
		"gid" => array(
			"type" => "hidden",
		),
		"image" => array(
			"type" => "upload",
			"show" => true,
			"desc" => "680px * 400px"
		)
	));

	$sql = "SELECT * FROM gallery_picture WHERE id = '$id'";
	$rss = $db->query($sql);

	$data = new Data($rss);
	$form->add_data($data->fetch_unique());

	$form->add_action("picture/update.php");

    $form->rain_display($tpl, "form");
?>